#ifndef CLIENTGUI_H
#define CLIENTGUI_H

#include <QMainWindow>
#include "include/opcda/OPCClient.h"
#include <QDebug>
#include <QSqlDatabase>
#include <QSqlError>
#include <QSqlQuery>
namespace Ui {
  class ClientGui;
}

class ClientGui : public QMainWindow
{
  Q_OBJECT

public:
  explicit ClientGui(QWidget *parent = 0);
  ~ClientGui();
  OPCClient *opc;

private slots:
  void on_btn_startopc_clicked();

  void on_pushButton_clicked();

  void on_pushButton_addItem_clicked();

  void sl_OnDataChange(OPCHANDLE hGroup,  DWORD dwCount, OPCHANDLE *phClientItems, VARIANT *pvValues, WORD *pwQualities, FILETIME *pftTimeStamps, HRESULT *pErrors);
  void on_pushButton_4_clicked();

  void on_pushButton_setLimmit_clicked();

  void on_radioButton_debugInfoOnOff_toggled(bool checked);

  void on_pushButton_confirmTime_clicked();

  void on_pushButton_write2Server_clicked();

private:
  Ui::ClientGui *ui;
  float m_upperLimmit;
  float m_lowwerLimmit;
  bool m_debugInfoOnOff;
  QSqlQuery m_sql_query;
};

#endif // CLIENTGUI_H
